<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>开始使用layui</title>
  <link rel="stylesheet" href="../layui/css/layui.css">
  
  
</head>
<body>
 
<!-- 你的HTML代码 -->
 
<script src="../layui/layui.js"></script>
<textarea id="demo" style="display: none;"></textarea>

	<script>
	layui.use('layedit', function(){
	  var layedit = layui.layedit;
	  
	  	layedit.set({
		  uploadImage: {
		    url: '../file/upload' //接口url
		    ,type: 'post' //默认post
		  }
		});
		
	  layedit.build('demo'); //建立编辑器
	  
	});
	</script>
	
</body>
</html>